/**
 * @Author YuanYuan
 * @Date 2022/4/24
 * @Time 18:12
 */
public class TestDemo {
    public static int MAX = 100;
    public static void main(String[] args) {
        int sum = 0;
        for (int i = 1; i <= MAX; i++) {
            int ret = i;
            while(ret!=0) {
                if(9 == ret%10) {
                    sum++;
                }
                ret/=10;
            }
        }
        System.out.println(sum);
    }
}
